import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/role_personnel_entity.dart';
import 'package:enterprise_v6_app/app/data/common/choice_bean.dart';


RolePersonnelEntity $RolePersonnelEntityFromJson(Map<String, dynamic> json) {
  final RolePersonnelEntity rolePersonnelEntity = RolePersonnelEntity();
  final String? nickName = jsonConvert.convert<String>(json['nickName']);
  if (nickName != null) {
    rolePersonnelEntity.nickName = nickName;
  }
  final String? userId = jsonConvert.convert<String>(json['userId']);
  if (userId != null) {
    rolePersonnelEntity.userId = userId;
  }
  final String? userName = jsonConvert.convert<String>(json['userName']);
  if (userName != null) {
    rolePersonnelEntity.userName = userName;
  }
  return rolePersonnelEntity;
}

Map<String, dynamic> $RolePersonnelEntityToJson(RolePersonnelEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['nickName'] = entity.nickName;
  data['userId'] = entity.userId;
  data['userName'] = entity.userName;
  return data;
}

extension RolePersonnelEntityExtension on RolePersonnelEntity {
  RolePersonnelEntity copyWith({
    String? nickName,
    String? userId,
    String? userName,
  }) {
    return RolePersonnelEntity()
      ..nickName = nickName ?? this.nickName
      ..userId = userId ?? this.userId
      ..userName = userName ?? this.userName;
  }
}
